import React, {useState} from 'react';
import {Modal} from 'antd';
import './ViewDetails.scss';

function ViewDetails(props) {
  const [express, setExpress] = useState('');
  const [data, setData] = useState([]);
  const collectingData = (express, data) => {
    setExpress(express);
    setData(data);
  };
  console.log(props);
  return (
    <div className={'deliverGoods'}>
      <Modal
        width={1200}
        title='退货审核详情'
        visible={props.visible}
        onOk={props.handleOk}
        onCancel={props.handleCancel}
      >
        <div className={'viewDetails__box'}>
          <ul>
            <li>
              <p>商品名称：{props.data.goods_title}</p>
              <p>退货编号：{props.data.refund_no}</p>
              <p>退款金额：{props.data.refund_price}</p>
              <p>退款描述：{props.data.refund_description}</p>
            </li>
            <li>
              {
                props.data.certificate && props.data.certificate.map(item => (
                  <img key={item} src={item}/>
                ))
              }
            </li>
          </ul>
        </div>
      </Modal>
    </div>
  );
}

export default ViewDetails;
